Passed
Branch master (312c6c)
by Alejandro
02:34
created

server.js ➔ reducer   A

Complexity

Conditions 3
Paths 2

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 3

Importance

Changes 0
Metric Value
cc 3
eloc 6
nc 2
dl 0
loc 8
ccs 3
cts 3
cp 1
crap 3
rs 10
c 0
b 0
f 0
nop 2

2 Functions

Rating   Name   Duplication   Size   Complexity  
A server.js ➔ ... ➔ ??? 0 1 1
A server.js ➔ ??? 0 1 1
1
import { createAction, handleActions } from 'redux-actions';
2
import { pipe } from 'ramda';
3
4 1
export const FETCH_SERVERS = 'shlink/servers/FETCH_SERVERS';
5
6 1
export const listServers = ({ listServers }) => createAction(FETCH_SERVERS, () => listServers());
7
8 1
export const createServer = ({ createServer }, listServers) => pipe(createServer, listServers);
9
10 1
export const deleteServer = ({ deleteServer }, listServers) => pipe(deleteServer, listServers);
11
12 1
export const createServers = ({ createServers }, listServers) => pipe(createServers, listServers);
13
14
export default handleActions({
15 1
  [FETCH_SERVERS]: (state, { payload }) => payload,
16
}, {});
17